// Decompiled by DJ v3.7.7.81 Copyright 2004 Atanas Neshkov  Date: 2007-9-15 18:54:37

// Decompiler options: packimports(3) fieldsfirst ansi 
// Source File Name:   wp.java

package com.zelix;

import java.io.*;
import java.util.*;
import java.util.zip.*;

// Referenced classes of package com.zelix:
//            rb, hc, nc, oc, 
//            qc, xp, ay, bs, 
//            zu, w6, tb

public class wp
{

    private static String z[];

    private static File a(BufferedInputStream bufferedinputstream)
        throws IOException
    {
        File file = qc.a();
        BufferedOutputStream bufferedoutputstream = null;
        try
        {
            bufferedoutputstream = new BufferedOutputStream(new FileOutputStream(file));
            byte abyte0[] = new byte[1024];
            int i;
            while((i = bufferedinputstream.read(abyte0)) >= 0) 
                bufferedoutputstream.write(abyte0, 0, i);
        }
        finally
        {
            if(bufferedoutputstream != null)
                try
                {
                    bufferedoutputstream.close();
                }
                catch(IOException _ex) { }
        }
        return file;
    }

    public static File a(File file)
        throws IOException
    {
        BufferedInputStream bufferedinputstream = null;
        try
        {
            bufferedinputstream = new BufferedInputStream(new FileInputStream(file));
            File file1 = a(bufferedinputstream);
            return file1;
        }
        finally
        {
            if(bufferedinputstream != null)
                try
                {
                    bufferedinputstream.close();
                }
                catch(IOException _ex) { }
        }
    }

    public static File a(ZipFile zipfile, ZipEntry zipentry)
        throws IOException
    {
        BufferedInputStream bufferedinputstream = null;
        try
        {
            bufferedinputstream = new BufferedInputStream(zipfile.getInputStream(zipentry));
            File file = a(bufferedinputstream);
            return file;
        }
        finally
        {
            if(bufferedinputstream != null)
                try
                {
                    bufferedinputstream.close();
                }
                catch(IOException _ex) { }
        }
    }

    public static void a(File file, Vector vector, Hashtable hashtable, ArrayList arraylist, HashSet hashset, String s, hc hc1, bs bs1)
    {
        String s1;
        Vector vector1;
        boolean flag1;
label0:
        {
            flag1 = tb.b;
            if(hc1 != null)
            {
                s1 = hc1.a(s);
                if(!flag1)
                    break label0;
            }
            s1 = file.getAbsolutePath();
        }
        vector1 = new Vector();
        hc hc2;
label1:
        {
label2:
            {
                hc2 = (hc)hashtable.get(s1);
                if(hc2 != null)
                    break label1;
                if(hc1 != null)
                {
                    hc2 = new hc(file.getAbsolutePath(), file.length(), s, hc1);
                    if(!flag1)
                        break label2;
                }
                hc2 = new hc(file.getAbsolutePath(), file.length(), s);
            }
            hashtable.put(s1, hc2);
        }
        if(arraylist == null || hc1 == null) goto _L2; else goto _L1
_L1:
        if(!oc.h) goto _L4; else goto _L3
_L3:
        String s2 = s1;
        if(!flag1) goto _L5; else goto _L4
_L4:
        s2 = s1.toUpperCase();
_L5:
        int j;
        s2 = s2.replace('\\', '/');
        j = 0;
        if(!flag1) goto _L7; else goto _L6
_L6:
        String s3 = ((String)arraylist.get(j)).trim();
        if(s3.length() > 0)
        {
            String s4 = "*" + s3;
            if(!oc.h)
                s4 = s4.toUpperCase();
            if(zu.b(s2, s4))
            {
                bs1.d(z[5], z[17] + s1 + z[3] + s3 + "\"");
                hashset.add(hc2);
                return;
            }
        }
        j++;
_L7:
        if(j < arraylist.size()) goto _L6; else goto _L2
_L2:
        boolean flag = false;
        ZipEntry zipentry = null;
        w6 w6_1 = new w6(file);
        Enumeration enumeration = w6_1.entries();
        while(enumeration.hasMoreElements()) 
        {
            ZipEntry zipentry1 = (ZipEntry)enumeration.nextElement();
            if(zipentry1.isDirectory())
                continue;
            String s5 = zipentry1.getName();
            if(s5.endsWith(z[1]))
            {
                vector.addElement(new nc(w6_1, zipentry1, hc2));
                flag = true;
                if(!flag1)
                    continue;
            }
            if(hc.b(s5))
            {
                File file1 = a(((ZipFile) (w6_1)), zipentry1);
                vector1.addElement(new xp(hc2, s5, file1));
                if(!flag1)
                    continue;
            }
            if(!s5.equalsIgnoreCase(z[2]))
                continue;
            if(zipentry == null)
            {
                zipentry = zipentry1;
                if(!flag1)
                    continue;
            }
            bs1.b(z[11], z[14] + s + z[9] + zipentry.getName() + z[0] + zipentry1.getName() + "'");
        }
        if(zipentry != null)
        {
            Object obj1 = null;
            try
            {
                ay ay1 = new ay(w6_1, zipentry);
                hc2.a(ay1);
            }
            catch(rb rb1)
            {
                bs1.b(z[13], z[8] + s + z[12] + rb1.getMessage());
            }
            catch(IOException ioexception)
            {
                bs1.b(z[11], z[15] + s + z[12] + ioexception);
            }
        }
        if(!flag)
            w6_1.close();
        break MISSING_BLOCK_LABEL_915;
        Object obj;
        obj;
        StringBuffer stringbuffer = new StringBuffer();
        stringbuffer.append("\"" + s1 + z[10]);
        if(!s1.equals(s))
            stringbuffer.append(z[7] + s + z[6]);
        stringbuffer.append(((Throwable) (obj)).getMessage());
        bs1.d(z[4], stringbuffer.toString());
        break MISSING_BLOCK_LABEL_915;
        obj;
        StringBuffer stringbuffer1 = new StringBuffer();
        stringbuffer1.append("\"" + s1 + z[16]);
        if(!s1.equals(s))
            stringbuffer1.append("\"" + s + z[6]);
        stringbuffer1.append(((Throwable) (obj)).getMessage());
        bs1.c(z[11], stringbuffer1.toString());
        int i = 0;
        if(!flag1) goto _L9; else goto _L8
_L8:
        xp xp1 = (xp)vector1.elementAt(i);
        a(xp1.c, vector, hashtable, arraylist, hashset, xp1.b, xp1.a, bs1);
        i++;
_L9:
        if(i >= vector1.size())
            return;
        if(true) goto _L8; else goto _L10
_L10:
    }

    private static String z(char[] chs) {
        byte key = 0;
        for (int i = 0; i < chs.length; i++) {
            switch (i % 5) {
                case 0:
                    key =0x1d;
                    break;
                case 1:
                    key =59;
                    break;
                case 2:
                    key =80;
                    break;
                case 3:
                    key =124;
                    break;
                case 4:
                    key =6;
                    break;
            }
            chs[i] ^= key;
        }
        return new String(chs).intern();
    }

    static 
    {
        String as[];
        as = new String[18];
        as[0] = ":\033w";
        as[1] = "3X<\035un";
        as[2] = "P~\004=+Tu\026SK\\u\031:CNo~1@";
        as[3] = ":\0332\031e|N#\031&r]p\fgoZ=\031rxIpQ$";
        as[4] = "\\i\0234OK~p:OQ~p9TOt\002F";
        as[5] = "Jz\0022OS|j";
        as[6] = "?\033j\\";
        as[7] = "=\031";
        as[8] = "TU&\035jt_p1GSr\0269UI\0339\022&:";
        as[9] = ":\033j\\!";
        as[10] = "?\0333\023sq_>[r=Y5\\im^>\031b=Z#\\gs\0331\016euR&\031&{R<\031&'\033";
        as[11] = "[r\0349&Xi\0023T'";
        as[12] = ":\033j\\";
        as[13] = "[r\0349YXi\0023T'";
        as[14] = "PT\"\031&iS1\022&rU5\\K\\u\031:CNop\025h=\034";
        as[15] = "XI\"\023t=I5\035btU7\\K\\u\031:CNop\025h=\034";
        as[16] = "?\0333\023sq_>[r=Y5\\im^>\031b=\001p";
        as[17] = "NP9\fvtU7\\hxH$\031b=Z\"\037ntM5\\!";
        for(int i = 0; i<as.length; i++){
            as[i] = z(as[i].toCharArray());
        }
        z = as;
    }
}